<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
use think\facade\Route;

Route::get('think', function () {
    return 'hello,ThinkPHP6!';
});

Route::get('hello/:name', 'index/hello');

Route::group('adress',function(){
    Route::rule(':id','Address/details');
    Route::rule(':name','Address/read');
})->allowCrossDomain();

Route::group('article',function(){
    Route::rule('','ArticleController/getArticle','GET');
    Route::rule('','ArticleController/addArticle','POST');
    Route::rule('','ArticleController/updateArticle','PUT');
    Route::rule('/list','ArticleController/getArticleList','GET');
    Route::rule('/:id','ArticleController/deleteArticle','DELETE');
})->allowCrossDomain();

